﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:jSLCore_Client_Presentation_Controls="clr-namespace:jSLCore.Client.Presentation.Controls;assembly=jSLCore.Client.Presentation"
    xmlns:local="clr-namespace:jSLApp.Client.Controls" xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
    xmlns:Selection="clr-namespace:jSLCore.Client.Presentation.Wpf.TelerikSupport.Selection;assembly=jSLCore.Client.Presentation.Telerik" 
    xmlns:Selection1="clr-namespace:jSLCore.Client.Presentation.BaseControl.Selection;assembly=jSLCore.Client.Presentation" 
    xmlns:Managment="clr-namespace:jSLCore.Client.Presentation.Authorization.Managment;assembly=jSLCore.Client.Presentation" xmlns:Controls1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls">
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="/jSLApp.Client;component/Controls/ScrollBarStyle.xaml"/>
	</ResourceDictionary.MergedDictionaries>

    <SolidColorBrush x:Key="backGround22" Color="#FF222222"/>

    <SolidColorBrush x:Key="backGround33" Color="#FF333333"/>

    <SolidColorBrush x:Key="LightLines" Color="#FF5E5E5E"/>

    <SolidColorBrush x:Key="GlassBrush" Color="#99000000"/>
    
    <SolidColorBrush x:Key="absoluteWhite" Color="White"/>

    <SolidColorBrush x:Key="absoluteBlack" Color="Black"/>

    <RadialGradientBrush x:Key="orangeBorder" RadiusX="1.60896" RadiusY="1.59388" Center="0.106299,-0.225" GradientOrigin="0.106299,-0.225">
        <RadialGradientBrush.RelativeTransform>
            <TransformGroup>
                <SkewTransform CenterX="0.106299" CenterY="-0.225" AngleX="41.0886" AngleY="0"/>
                <RotateTransform CenterX="0.106299" CenterY="-0.225" Angle="57.04"/>
            </TransformGroup>
        </RadialGradientBrush.RelativeTransform>
        <GradientStop Color="#FFF7931E" Offset="0"/>
        <GradientStop Color="#FFF05924" Offset="1"/>
    </RadialGradientBrush>
	
    <Style TargetType="Controls1:RadBusyIndicator">    	
    	<Setter Property="Background" Value="#00000000"/>
    	<Setter Property="BorderBrush" Value="#00D0D0D0"/>
    	<Setter Property="BusyContent" Value="Загрузка..."/>        
    </Style>
    
    <LinearGradientBrush x:Key="ImageGroupBoxHeaderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF474747" Offset="0"/>
        <GradientStop Color="Black" Offset="1"/>
    </LinearGradientBrush>

    <Style TargetType="Controls:RadRating">
        <Setter Property="Margin" Value="5"/>        
    </Style>
    
    <Style TargetType="ComboBox">
        <Setter Property="Foreground" Value="Black"/>
    </Style>
    
    <Style TargetType="Border">
        <Setter Property="Background" Value="{StaticResource backGround22}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="CornerRadius" Value="0"/>
    </Style>
    
    <Style TargetType="Selection1:jSLGrid">
        <Setter Property="AutoGenerateColumns" Value="False"/>        
        <Setter Property="IsReadOnly" Value="True"/>
        <Setter Property="Background" Value="Black"/>
    </Style>

    <Style TargetType="Managment:PermissionGrid">
        <Setter Property="AutoGenerateColumns" Value="False"/>        
        <Setter Property="IsReadOnly" Value="True"/>
        <Setter Property="Background" Value="Black"/>
    </Style>

    <Style TargetType="Selection:jSLRadGrid" x:Key="radGrid">
        <Setter Property="AlternateRowBackground" Value="{StaticResource backGround33}"/>
        <Setter Property="AlternationCount" Value="2"/>        
        <Setter Property="AutoGenerateColumns" Value="False"/>
        <Setter Property="IsReadOnly" Value="True"/>
        <Setter Property="VerticalGridLinesBrush" Value="{StaticResource LightLines}"/>
        <Setter Property="HorizontalGridLinesBrush" Value="{StaticResource LightLines}"/>        
        <Setter Property="Background" Value="{StaticResource backGround22}"/>
        <Setter Property="RowIndicatorVisibility" Value="Collapsed"/>
    </Style>
    
    <Style BasedOn="{StaticResource radGrid}" TargetType="Selection:jSLRadGrid"/>
    
    <Style TargetType="TextBlock">
        <Setter Property="Foreground" Value="{StaticResource absoluteWhite}"/>
        <Setter Property="Margin" Value="5"/>
    </Style>

	
	<Style TargetType="ScrollViewer">
		<Setter Property="BorderThickness" Value="0"/>		
    </Style>
    
    <Style TargetType="ContentControl">
        <Setter Property="Foreground" Value="{StaticResource absoluteWhite}"/>        
    </Style>
    
    <Style TargetType="HyperlinkButton">
        <Setter Property="Foreground" Value="{StaticResource absoluteWhite}"/>
		<Setter Property="Margin" Value="5"/>
        <Setter Property="Template">
        	<Setter.Value>
        	<ControlTemplate TargetType="HyperlinkButton">
        		<TextBlock Text="{TemplateBinding Content}" TextDecorations="Underline" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        	</ControlTemplate>				
			</Setter.Value>
        </Setter>
    </Style>
    
    <Style TargetType="CheckBox">
        <Setter Property="Margin" Value="5"/>
        <Setter Property="Foreground" Value="{StaticResource absoluteWhite}"/>
    </Style>

    <Style TargetType="jSLCore_Client_Presentation_Controls:ImageGroupBox">
        <Setter Property="BorderBrush" Value="{StaticResource ImageGroupBoxHeaderBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource absoluteWhite}"/>
        <Setter Property="Padding" Value="5"/>
		<Setter Property="Margin" Value="5"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="jSLCore_Client_Presentation_Controls:ImageGroupBox">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding CornerRadius}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Grid Grid.Row="0">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="auto"/>
                                    <RowDefinition/>
                                    <RowDefinition Height="auto"/>
                                </Grid.RowDefinitions>
                                <local:Border5px  Grid.Row="0" Height="5"/>
                                <local:Border5px  Grid.Row="2" Height="5" RenderTransformOrigin="0,0.35">
                                    <local:Border5px.RenderTransform>
                                		<CompositeTransform CenterY="0.5" ScaleX="1" ScaleY="-1"/>
                                	</local:Border5px.RenderTransform>
                                </local:Border5px>
                                <Border Background="{TemplateBinding BorderBrush}" Grid.Row="1">
                                    <Grid >
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="auto"/>
                                            <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <Image Grid.Column="0" Height="15" Margin="5,2,5,2" Source="{TemplateBinding ImageSource}" Stretch="Fill"/>

                                        <ContentPresenter Content="{TemplateBinding Header}" Grid.Column="1" Margin="5,2,50,2" VerticalAlignment="Center">
                                            <ContentPresenter.Resources>
                                                <ResourceDictionary>
                                                    <Style TargetType="ContentControl">
                                                        <Setter Property="Margin" Value="5"/>
                                                        <Setter Property="Foreground" Value="{StaticResource absoluteWhite}"/>
                                                        <Setter Property="FontSize" Value="18"/>
                                                    </Style>
                                                </ResourceDictionary>
                                            </ContentPresenter.Resources>
                                        </ContentPresenter>

                                    </Grid>
                                </Border>
                            </Grid>
                            <ScrollViewer BorderThickness="0" HorizontalScrollBarVisibility="{TemplateBinding ScrollBarVisible}" Grid.Row="1" VerticalScrollBarVisibility="{TemplateBinding ScrollBarVisible}">
                                <ContentPresenter Cursor="{TemplateBinding Cursor}" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>        
    </Style>
</ResourceDictionary>
